<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"  pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<script type="text/javascript" src="generic_script.js"></script>
<title><c:out value="${title}"/></title>
</head>
<body onload="changeLabels()">
	<c:choose>
		<c:when test="${beanclass !=null}">
			<table border="1">
				<jsp:useBean id="bo" class="pkg.genericity.business.BeanBO" scope="page" />
				<c:set target="${bo}" property="className" value="${beanclass}" />
				<c:forEach items="${bo.records}" var="record" varStatus="rownum">
					<tr>
						<c:forEach items="${record}" var="column" varStatus="colnum">
							<c:choose>
								<c:when test="${rownum.first}">
									<td style="background-color: #E6E6E6"><label> <c:out value="${column}" /></label></td>
								</c:when>
								<c:otherwise>
									<td><c:out value="${column}" /></td>
								</c:otherwise>
							</c:choose>
						</c:forEach>
					</tr>
				</c:forEach>
			</table>
		</c:when>
		<c:otherwise>
			<c:set var="errmsg" value="No Bean Defined Yet. Please define the bean first"></c:set>
			<c:set var="nexturl" value="index.jsp"></c:set>
			<c:redirect url="error_page.jsp" />
		</c:otherwise>
	</c:choose>
	<div><a href="">Home Page</a></div>
</body>
</html>